package com.fenxiangle.yueding.feature.home.view.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.fenxiangle.yueding.R;
import com.fenxiangle.yueding.common.util.DateTool;
import com.fenxiangle.yueding.common.widget.RatingBar;
import com.fenxiangle.yueding.entity.bo.CommentBo;

import java.util.List;

public class RatingAdapter extends BaseQuickAdapter<CommentBo,BaseViewHolder> {
    public RatingAdapter() {
        super(R.layout.item_rating);
    }

    @Override
    protected void convert(BaseViewHolder helper, CommentBo item) {
        RatingBar ratingBar=helper.getView(R.id.rb_queestion_comment_star);
        ratingBar.setStar(item.getScore());
        helper.setText(R.id.tv_rating_time, DateTool.formatTime4(item.getScoreTime()));
    }
}
